package com.niguang.labour.admin.enums;

import lombok.Getter;

/**
 * 计薪方式
 */
@Getter
public enum PayWayEnum {


    POINT_WORK(1, "点工"),

    BAG_WORK(2, "包工"),

    MONTH_WORK(3, "月工");


    private Integer index;

    private String workName;

    PayWayEnum(Integer index, String workName) {
        this.index = index;
        this.workName = workName;
    }


    public static String getName(Integer index) {
        for (PayWayEnum c : PayWayEnum.values()) {
            if (c.index.equals(index)) {
                return c.workName;
            }
        }
        return "";
    }
}
